<?php

declare(strict_types=1);

namespace App\CustHub\Request;

use Mine\MineFormRequest;

class NewCustomerSchemeRequest extends MineFormRequest
{
    public function saveRules()
    {
        return [
            'name' => 'required',
            'corp_id' => 'required',
            'is_default' => 'required|in:0,1',
            'cfg' => 'required_if:is_default,0'
        ];
    }

    public function updateRules()
    {
        return [
            'id' => 'required',
            'is_default' => 'required|in:0,1',
            'cfg' => 'required_if:is_default,0'
        ];
    }

    public function renameRules()
    {
        return [
            'id' => 'required',
            'name' => 'required'
        ];
    }

    public function copyRules()
    {
        return [
            'id' => 'required',
        ];
    }
}